from torchmetrics import BLEUScore
from v2.training_process.metrics.bleu import bleuFromMaps


m1 = {0: "Non - blocking send with a logback formatter to format the message .",
1: "Get a copy of this ImmutableBitSet as a mutable BitSet .",
2: "Create an authorization header for the service owner .",
3: "Parse a float attribute and return the parsed value into a given TypedValue .",
4: "Records that the current thread is about to wait on the specified guard .",
5: "Parse the data into a thing if possible .",
6: "Gets the logical session timeout in minutes or null if at least one of the known servers does not support logical sessions .",
7: "Checks whether the - M option should be set and sets it .",
8: "Parse the message in a given InputStream using scpecified Method",
9: "Builds the signature base string from the data this instance was configured with .",
10: "Faz o cancelamento da nota",
11: "Evaluates whether the argument is an ISATAP address .",
12:	",Get the column value as LocalDateTime .",
13: "Adds one file to the index with no GitAddOptions .",
14: "Gets the ballot document data .",
15:	"Converts an array of bytes into an array of characters representing the hexadecimal values of each byte in order . The returned array will be double the length of the passed array as it takes two characters to represent any given byte .",
16: "Get a BoxDeveloperEditionAPIConnection that can be used by an App user to access Box .",
17: "Attempts to find the instrumentation test runner from inside the AndroidManifest . xml file .",
18: "Connect to an HTTP URL and return the response as a string .",
19: "Display change log lock information .",
20: "Creates a Requery module with Reactor data store .",
21: "Returns a Local Storage .",
22: "Set a default action which is execute when no user is logged in .",
23: "May have leading zeros . Strip them before considering making this method public",
24: "Constructs a web request to delete the share and all of the directories and files within it . Sign with no length specified .",
25: "Returns priority stored for the given thread .",
26: "Register the given directory with the WatchService",
27: "Format the media type in a HTTP - header compliant manner using preferred format .",
28:	"Register helpers and do nothing if a helper with the same name is already registered .",
29: "the profile and do a launch .",
30: "Backpatches the message length into the beginning of the message .",
31: " Visits a nested annotation value of the annotation ."}
m2 = {0: "Get a class from a type .",
1: "Renames a branch .",
2: "Get the ModelModel object .",
3: "Sets the listener listener .",
4: "Sets the default script names .",
5: "Checks if the given string is valid .",
6: "Adds a query to the database .",
7: "Check if a variable is set .",
8: "Gets the server .",
9: "Checks if the given character is a name .",
10: "Returns a list of all sockets in the given address .",
11: "Update the fields of the database .",
12: "Decrypt a value .",
13: "Get the value of a field .",
14: "Asserts that the given result is sorted .",
15: "Sets the cache .",
16: "Returns the value of the given value .",
17: "Returns true if the given character is a valid character .",
18: "Sends a buffer to the buffer .",
19: "Get the filesystem for the given path .",
20: "Initialize the transaction .",
21: "Returns the absolute path relative to a resource .",
22: "Generate index name .",
23: "Registers a new session .",
24: "Decodes a sequence element .",
25: "Attempt to acquire a plan if necessary .",
26: "Sets all the current spans .",
27: "Gets the type of a node .",
28: "Adds a type to the database .",
29: "Appends a clause to a clause .",
30: "Returns a string representation of the given value .",
31: "This method is called internally to receive a CurrencyCurrency"}

bleu = BLEUScore()
print(bleu(m1, m2))
print(bleuFromMaps(m1, m2))
